package org.xenon.vote.model.middleware;

import org.xenon.vote.model.pojo.po.Choice;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 一场投票的所有选项
 */
public class Option {
    @Min(value = 2, message = "option.min")
    @NotNull(message = "option.null")
    List<Choice> choices;

    public Option(@Min(value = 2, message = "option.min")
                  @NotNull(message = "option.null") List<Choice> choices) {
        this.choices = choices;
    }

    public List<Choice> getChoices() {
        return choices;
    }

    public void setChoices(List<Choice> choices) {
        this.choices = choices;
    }
}
